/*
 * Copyright 2020 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.hnly.djdl.model

import androidx.compose.runtime.Immutable

@Immutable
data class SnackCollection(
    val id: Long,
    val name: String,
    val snacks: List<Snack>,
    val type: CollectionType = CollectionType.Normal
)

enum class CollectionType { Normal, Highlight }

/**
 * A fake repo
 */
//object SnackRepo {
    //    fun getSnacks(): List<SnackCollection> = snackCollections
//    fun getSnack(snackId: Long): Snack {
//        if (indexSnackMap.containsKey(snackId).not()) {
//
//        }
//        return indexSnackMap[snackId]!!
//    }
//    fun getInspiredByCart() = inspiredByCart
//    fun getFilters() = com.planta.model.filters
//    fun getCart() = cart
//}
//// 玫瑰
//private val coMeiGui = SnackCollection(
//    id = 1L,
//    name = "玫瑰花",
//    type = CollectionType.Highlight,
//    snacks = meigui
//)
//// 荷花
//private val coHeHua = SnackCollection(
//    id = 1L,
//    name = "荷花",
//    type = CollectionType.Highlight,
//    snacks = hehua
//)
//
//// 其他
//private val coOther = SnackCollection(
//    id = 1L,
//    name = "其他",
//    type = CollectionType.Highlight,
//    snacks = other
//)
//
//
//private val coMoLi = SnackCollection(
//    id = 1L,
//    name = "茉莉",
//    type = CollectionType.Normal,
//    snacks = moli
//)
//
//private val coBaiHe = SnackCollection(
//    id = 1L,
//    name = "百合",
//    type = CollectionType.Normal,
//    snacks = baihe
//)
//private val tastyTreats = SnackCollection(
//    id = 1L,
//    name = "Android's picks",
//    type = CollectionType.Highlight,
//    snacks = snacks.subList(0, 13)
//)
//private val popular = SnackCollection(
//    id = 2L,
//    name = "Popular on Jetsnack",
//    snacks = snacks.subList(14, 19)
//)
//private val wfhFavs = tastyTreats.copy(
//    id = 3L,
//    name = "WFH favourites"
//)
//
//private val newlyAdded = popular.copy(
//    id = 4L,
//    name = "Newly Added"
//)
//
//private val exclusive = tastyTreats.copy(
//    id = 5L,
//    name = "Only on Jetsnack"
//)
//private val also = tastyTreats.copy(
//    id = 6L,
//    name = "Customers also bought"
//)
//private val inspiredByCart = tastyTreats.copy(
//    id = 7L,
//    name = "Inspired by your cart"
//)
// 玫瑰花
// 荷花
// 其他
//
//private val snackCollections = listOf(
//    coMeiGui,
////    tastyTreats,
////    popular,
//    coMoLi,
//    coHeHua,
////    wfhFavs,
////    newlyAdded,
//    coBaiHe,
//    coOther
////    exclusive
//)
//
//private val related = listOf(
//    also,
//    popular
//)
//
//private val cart = listOf(
//    OrderLine(snacks[4], 2),
//    OrderLine(snacks[6], 3),
//    OrderLine(snacks[8], 1)
//)
//
//@Immutable
//data class OrderLine(
//    val snack: Snack,
//    val count: Int
//)
